using System.ComponentModel.DataAnnotations;
using Resources;

namespace Excuse.Models
{
    public class EmailContact
    {
        [Required]
        [Display(Name = "EmailName", ResourceType = typeof(Resources.ApplicationLabels))]
        [RegularExpression(@"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$", ErrorMessageResourceName = "EmailValidationMessage", ErrorMessageResourceType = typeof(Resources.ApplicationMessages))]
        public string Email { get; set; }

        [Required]
        [Display(Name = "EmailLabel", ResourceType = typeof(Resources.ApplicationLabels))]
        public string DisplayName { get; set; }
    }
}